package com.kaiyun.sharding.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kaiyun.sharding.mapper.provide.CourseInfoProvide;
import com.kaiyun.sharding.model.CourseInfo;
import com.kaiyun.sharding.model.param.Course;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * 单库多表
 * @author zhanNaifeng
 * @see
 * @since
 */
public interface CourseInfoMapper extends BaseMapper<CourseInfo> {
    /**
     * 带有分页
     * @param page
     * @param name
     * @return
     */
    @SelectProvider(type = CourseInfoProvide.class, method = "getList")
    List<Course> getList(IPage page , String name);

    /**
     * 不带分页
     * @param name
     * @return
     */
    @SelectProvider(type = CourseInfoProvide.class, method = "getList2")
    List<Course> getList2(String name);
}
